//1.1 先导入 vue 模块
import Vue from 'vue'

//2.1 导入路由模块
import VueRouter from 'vue-router'

//2.2 导入登录路由组件
import login from '../components/Login/login.vue'
import register from '../components/Login/register.vue'
import home from '../components/Tabers/HomeContainer.vue'
import member from '../components/Tabers/MemberContainer.vue'
import shopcar from '../components/Tabers/ShopContainer.vue'
import search from '../components/Tabers/SearchContainer.vue'


//2.3 注册路由
Vue.use(VueRouter);

//2.4 创建路由
var router = new VueRouter({
  routes:[
    {path:'/',redirect:"/home"}, //重定向
    {path:'/home',component:home},
    {path:'/member',component:member},
    {path:'/search',component:search},
    {path:'/shopcar',component:shopcar},
  ],
  linkActiveClass:'mui-active',
})

//导出路由
export default router;